<template>
	<view class="route-vue-wrapper">
		<view class="route-count">
			<view class="count-item" v-for="(item,index) in countData" :key="index">
				<view class="count-label">
					<text>{{ item.label }}</text>
				</view>
				<view class="count-value">
					<text>{{ item.value }}</text>
				</view>
			</view>
		</view>
		<view class="address-list">
			<view class="address-item" v-for="(item,index) in spotData" :key="index">
				<address-item :day="index" :record="item" />
			</view>
		</view>
	</view>
</template>

<script>
	import AddressItem from './address-item.vue'
	export default {
		components: { AddressItem },
		props: {
			countData: {
				type: Array,
				required: true,
			},
			spotData: {
				required: true,
			}
		},
		data() {
			return {

			}
		}
	}
</script>

<style lang="scss" scoped>
	.route-vue-wrapper {
		padding: 24rpx;
		position: relative;
		box-sizing: border-box;
		background-color: #ffffff;
		border-radius: 16rpx 16rpx 16rpx 16rpx;

		.address-list {
			.address-item {
				margin-bottom: 24rpx;

				&:last-child {
					margin-bottom: 0;
				}
			}
		}

		.route-count {
			background: #F6F6F6;
			overflow: hidden;
			padding: 16rpx 32rpx;
			box-sizing: border-box;
			display: flex;
			flex-flow: row nowrap;
			justify-content: space-between;
			background: #F6F6F6;
			border-radius: 8rpx 8rpx 8rpx 8rpx;
			margin-bottom: 24rpx;

			.count-item {
				display: flex;
				flex-flow: column;
				align-items: center;

				.count-label {
					height: 40rpx;
					font-size: 24rpx;
					color: rgba(0, 0, 0, 0.6);
					line-height: 40rpx;
				}

				.count-value {
					height: 44rpx;
					font-size: 28rpx;
					font-weight: bold;
					margin-top: 8rpx;
					color: rgba(0, 0, 0, 0.9);
					line-height: 44rpx;
				}
			}
		}
	}
</style>